package com.example.service.impl;

import com.example.mapper.PrivateCourseMapper;
import com.example.pojo.PrivateCourse;
import com.example.service.PrivateCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrivateCourseServiceImp implements PrivateCourseService {
    @Autowired
    private PrivateCourseMapper privateCourseMapper;
    @Override
    public PrivateCourse selectPrivateCourseById(int id) {
        return privateCourseMapper.selectPrivateCourseById(id);
    }


    @Override
    public List<PrivateCourse> selectByCid(int cid) {
        return privateCourseMapper.selectByCid(cid);
    }

    @Override
    public List<PrivateCourse> selectAllPrivateCourse() {
        return privateCourseMapper.selectAllPrivateCourse();
    }

    @Override
    public int insertPrivateCourse(PrivateCourse privateCourse) {
        return privateCourseMapper.insertPrivateCourse(privateCourse);
    }

    @Override
    public int deletePrivateCourseById(int id) {
        return privateCourseMapper.deletePrivateCourseById(id);
    }

    @Override
    public int updatePrivateCourse(PrivateCourse privateCourse) {
        return privateCourseMapper.updatePrivateCourse(privateCourse);
    }
}
